package main

import (
	"course-hub/user-srv/basic/handler/config"
	"course-hub/user-srv/basic/handler/inits"
	__ "course-hub/user-srv/basic/proto"
	"flag"
	"google.golang.org/grpc"
	"google.golang.org/grpc/credentials/insecure"
	"log"
)

var (
	addr = flag.String("addr", "localhost:50051", "the address to connect to")
)

func main() {

	config.Init()
	inits.Mysql()
	flag.Parse()
	// Set up a connection to the server.
	conn, err := grpc.NewClient(*addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
	if err != nil {
		log.Fatalf("did not connect: %v", err)
	}
	defer conn.Close()
	config.UserClient = __.NewUserClient(conn)

	// Contact the server and print out its response.
}
